Setting up the right Environment for
using the new
Domino v10 NodeRED
nodes
WARNING !
This process is ONLY required until the HCL
AppDev pack will be made publicly available
as an NPM installable package
Local Machine settings
Domino v10 NodeRED
nodes
Assumptions
You have access to the HCL App Dev Pack
You have node v10 installed on your local machine.
There are problems using V11 !!
In case you run node v11, please downgrade to V10
Check the local NodeJS node path
We want to install the AppDev pack globally, so that it will be
available to all the NodeJS applications running on the local machine
From your $HOME directory, enter the command node
Once in the nod application, enter the command module.paths
You may see an output like the following:
Check the local NodeJS node path – contd
The problem is that the “/Users/node_modules, /node_modulesand
“/usr/local/lib/node” directories do not exist !!
On my system a /usr/local/lib/node_modules directory exist which contains
the global nodejs modules available for my local machine
Exit from the node application
On Mac/Unix, issue the command
export NODE_PATH=/usr/local/lib/node_modules .
You may also want to set this new environment variable in your shell
initialization file !!!!
Unzip the AppDev Pack from HCL
Unzip the AppDev Pack in a directory of your choice
Go to the directory which contains the package subdirectory
Issue the command
npm install g package
If everything is ok, you will see a new directory being created at a
/usr/local/lib/node_modules/@domino directory
A /usr/local/lib/node_modules/@domino/domino-db subdirectory is also created which is a
symbolic link to where the package subdirectory is located
You may want to avoid the symbolic link and have the content of the package directory physically
deployed inside the new /usr/local/lib/node_modules/@domino/domino-db directory
Now, the HCL AppDev Pack is installed on your local machine
Open your local NodeRED Editor
Install node-red-contrib-dominodb using the standard “Manage Palette” functionality in NodeRed
The NodeRED package is installed and ready
to be used
IBM Cloud settings
Domino v10 NodeRED
nodes
Assumptions
You have an IBM Cloud NodeRed instance already setup
You have installed the HCL App Dev Pack on your local system
The AppDev Pack is available as @domino/domino-db on your local system
Go to your LOCAL installation of the AppDev
Pack
Suppose that you installed the HCL AppDev Pack in the
@domino/domino-db under the /usr/local/lib/node_modules
directory
Move to the domino-db directory : cd @domino/domino-db
”Pack” the AppDev Pack
From that directory issue the command : npm pack
”Pack” the AppDev Pack – contd
A File is generated in the same directory named domino-domino-db-
1.0.0.tgz
Move this file to a temporary directory. We will use it in a moment
Go to IBM Cloud and open your Toolchain
Click on the “Eclipse Orion Web IDE” icon
Expand the Directory Structure
Import the tarball
Import the file in the root directory !!!!
Import the tarball – contd
Modify the package.json file
Add the following line :
"@domino/domino-db": "file:./domino-domino-db-1.0.0.tgz",
Modify the package.json file – contd
Do NOT forget to modify the NodeJS version (to Version 8)
Save the package.json file
Now go to the GIT tab of your Toolchain
Add a Comment and click COMMIT
Push All the Changes to IBM Cloud
Going back to the editor, you should see your
instance
The instance should redeploy automatically
In case it does not, you can redeploy manually using this arrow:
Open your NodeRED Editor
Install node-red-contrib-dominodb using the standard “Manage Palette” functionality in NodeRed
The NodeRED package is installed and ready
to be used